<template>
  <div class="about-container">
    <!-- 金铲铲风格背景 -->
    <div class="game-background"></div>
    
    <!-- 背景装饰效果 -->
    <div class="background-shapes">
      <div class="shape shape-1"></div>
      <div class="shape shape-2"></div>
      <div class="shape shape-3"></div>
      <div class="shape shape-4"></div>
      <div class="shape shape-5"></div>
    </div>
    
    <!-- 金铲铲风格背景网格 -->
    <div class="background-grid"></div>
    
    <div class="about-content">
      <!-- 品牌标识 -->
      <div class="brand-logo">
        <div class="logo-glow"></div>
        <img src="@/assets/jcc_logo.svg" alt="金铲铲之战" />
      </div>
      
      <div class="about-header">
        <h1>金铲铲之战</h1>
        <p>英雄联盟云顶之弈正版授权手游</p>
        <div class="divider-small"></div>
      </div>
      
      <div class="about-info">
        <div class="info-section">
          <h2>游戏介绍</h2>
          <p>《金铲铲之战》是英雄联盟云顶之弈正版授权的自走棋手游，完美还原了端游的玩法与角色。玩家将在游戏中招募英雄，打造强力阵容，与其他玩家展开策略对决。</p>
        </div>
        
        <div class="info-section">
          <h2>最新赛季</h2>
          <p>当前赛季「幻灵战斗星系」已经开启！全新的太空主题，更多强力羁绊和英雄等待你的探索。收集幻灵能量，解锁专属装备，成为最强弈士！</p>
        </div>
        
        <div class="info-section">
          <h2>游戏特色</h2>
          <ul>
            <li>正版授权，完美还原云顶之弈玩法</li>
            <li>全新移动端优化体验</li>
            <li>定期更新赛季内容和英雄池</li>
            <li>丰富的社交系统，与好友一起开黑</li>
            <li>多种游戏模式，满足不同玩家需求</li>
          </ul>
        </div>
        
        <div class="info-section">
          <h2>联系我们</h2>
          <p>官方网站：<a href="#" class="contact-link">www.jcczz.com</a></p>
          <p>官方微信：金铲铲之战</p>
          <p>官方微博：@金铲铲之战</p>
        </div>
      </div>
      
      <div class="download-section">
        <h3>立即加入战斗</h3>
        <button class="download-button">
          <span class="button-content">
            <span>下载游戏</span>
            <span class="button-arrow">→</span>
          </span>
        </button>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'AboutView',
  data() {
    return {
      noiseCanvas: null
    }
  },
  created() {
    // 页面加载时创建噪声背景效果
    this.createNoiseEffect()
    
    // 页面加载时添加动画
    document.body.classList.add('about-page-active')
  },
  beforeUnmount() {
    document.body.classList.remove('about-page-active')
    
    // 清理噪声背景
    if (this.noiseCanvas && this.noiseCanvas.parentNode) {
      this.noiseCanvas.parentNode.removeChild(this.noiseCanvas)
    }
  },
  methods: {
    createNoiseEffect() {
      // 创建噪声背景效果
      const canvas = document.createElement('canvas')
      canvas.width = 200
      canvas.height = 200
      canvas.style.position = 'fixed'
      canvas.style.top = '0'
      canvas.style.left = '0'
      canvas.style.width = '100%'
      canvas.style.height = '100%'
      canvas.style.pointerEvents = 'none'
      canvas.style.zIndex = '1'
      canvas.style.opacity = '0.03'
      
      document.body.appendChild(canvas)
      this.noiseCanvas = canvas
      
      const ctx = canvas.getContext('2d')
      const imageData = ctx.createImageData(200, 200)
      const data = imageData.data
      
      // 生成噪声
      for (let i = 0; i < data.length; i += 4) {
        const noise = Math.floor(Math.random() * 256)
        data[i] = noise // R
        data[i + 1] = noise // G
        data[i + 2] = noise // B
        data[i + 3] = 255 // A
      }
      
      ctx.putImageData(imageData, 0, 0)
    }
  }
}
</script>

<style scoped>
/* 金铲铲游戏风格背景 */
.game-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1a103c 0%, #321b6e 50%, #1a103c 100%);
  z-index: 1;
  pointer-events: none;
}

.about-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a103c 0%, #321b6e 100%);
  padding: 20px;
  position: relative;
  overflow: hidden;
}

/* 背景装饰效果 */
.background-shapes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.15;
  animation: float 20s infinite ease-in-out;
  filter: blur(20px);
}

.shape-1 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.3) 0%, rgba(255, 215, 0, 0) 70%);
  top: -200px;
  left: -200px;
  animation-delay: 0s;
}

.shape-2 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(147, 112, 219, 0.4) 0%, rgba(147, 112, 219, 0) 70%);
  top: 40%;
  right: -150px;
  animation-delay: 5s;
}

.shape-3 {
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.3) 0%, rgba(255, 215, 0, 0) 70%);
  bottom: -125px;
  left: 20%;
  animation-delay: 10s;
}

.shape-4 {
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(147, 112, 219, 0.5) 0%, rgba(147, 112, 219, 0) 70%);
  top: 20%;
  left: 70%;
  animation-delay: 3s;
}

.shape-5 {
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.4) 0%, rgba(255, 215, 0, 0) 70%);
  bottom: 30%;
  right: 30%;
  animation-delay: 7s;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(30px, 30px) rotate(5deg);
  }
  50% {
    transform: translate(0, 60px) rotate(0deg);
  }
  75% {
    transform: translate(-30px, 30px) rotate(-5deg);
  }
}

/* 游戏风格的网格装饰 */
.background-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(255, 215, 0, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 215, 0, 0.03) 1px, transparent 1px);
  background-size: 30px 30px;
  pointer-events: none;
  z-index: 2;
}

.about-content {
  background: rgba(26, 16, 60, 0.85);
  backdrop-filter: blur(15px);
  border-radius: 12px;
  border: 2px solid rgba(255, 215, 0, 0.3);
  box-shadow: 0 15px 60px rgba(0, 0, 0, 0.4), 
              0 0 30px rgba(255, 215, 0, 0.1),
              0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  padding: 60px;
  width: 100%;
  max-width: 800px;
  position: relative;
  overflow: hidden;
  transition: transform 0.6s ease, box-shadow 0.6s ease;
  opacity: 0;
  transform: translateY(30px) scale(0.95);
  animation: pageLoad 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards 0.3s;
  z-index: 2;
}

@keyframes pageLoad {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.about-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, 
    rgba(255, 215, 0, 0) 0%, 
    rgba(255, 215, 0, 1) 50%, 
    rgba(255, 215, 0, 0) 100%);
  animation: glowPulse 4s infinite ease-in-out;
}

@keyframes glowPulse {
  0%, 100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

.about-content:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.5), 
              0 0 40px rgba(255, 215, 0, 0.15),
              0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

/* 品牌标识 */
.brand-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
  position: relative;
  animation: logoPulse 3s infinite ease-in-out;
}

@keyframes logoPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.logo-glow {
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.4) 0%, rgba(255, 215, 0, 0) 70%);
  animation: glowEffect 2s infinite ease-in-out;
}

@keyframes glowEffect {
  0%, 100% {
    opacity: 0.5;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

.about-header {
  text-align: center;
  margin-bottom: 40px;
  position: relative;
}

.about-header h1 {
  margin: 0;
  font-size: 48px;
  color: #FFD700;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px;
  position: relative;
  display: inline-block;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.about-header p {
  color: #DDA0DD;
  margin-top: 15px;
  font-size: 18px;
  letter-spacing: 1px;
  font-style: italic;
}

.divider-small {
  width: 120px;
  height: 1px;
  background: linear-gradient(90deg, 
    rgba(255, 215, 0, 0) 0%, 
    rgba(255, 215, 0, 0.5) 50%, 
    rgba(255, 215, 0, 0) 100%);
  margin: 20px auto 0;
}

.about-info {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.info-section {
  position: relative;
  padding: 25px;
  background: rgba(26, 16, 60, 0.5);
  border-radius: 8px;
  border-left: 3px solid #FFD700;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-section:hover {
  transform: translateX(5px);
  box-shadow: 0 5px 20px rgba(255, 215, 0, 0.15);
}

.info-section h2 {
  margin-top: 0;
  color: #FFD700;
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.info-section p {
  color: #DDA0DD;
  line-height: 1.6;
  margin-bottom: 15px;
}

.info-section ul {
  color: #DDA0DD;
  padding-left: 20px;
  line-height: 1.6;
}

.info-section li {
  margin-bottom: 8px;
  position: relative;
  list-style-type: none;
  padding-left: 20px;
}

.info-section li:before {
  content: '✦';
  color: #FFD700;
  position: absolute;
  left: 0;
  font-size: 14px;
}

.contact-link {
  color: #FFD700;
  text-decoration: none;
  transition: color 0.3s ease, border-bottom 0.3s ease;
  border-bottom: 1px dotted rgba(255, 215, 0, 0.3);
}

.contact-link:hover {
  color: #DDA0DD;
  border-bottom: 1px solid #FFD700;
}

.download-section {
  text-align: center;
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 215, 0, 0.2);
}

.download-section h3 {
  color: #DDA0DD;
  font-size: 20px;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.download-button {
  padding: 16px 30px;
  background: linear-gradient(135deg, #FFD700 0%, #DAA520 100%);
  color: #1a103c;
  border: none;
  border-radius: 4px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.download-button:hover {
  background: linear-gradient(135deg, #FFE44D 0%, #E6C229 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 215, 0, 0.4);
}

.download-button:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(255, 215, 0, 0.3);
}

.button-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: gap 0.3s ease;
}

.download-button:hover .button-content {
  gap: 12px;
}

.button-arrow {
  font-size: 18px;
  font-weight: bold;
  transition: transform 0.3s ease;
}

.download-button:hover .button-arrow {
  transform: translateX(2px);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .about-content {
    padding: 40px 20px;
  }
  
  .about-header h1 {
    font-size: 36px;
  }
  
  .info-section {
    padding: 20px;
  }
  
  .info-section h2 {
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .about-header h1 {
    font-size: 28px;
  }
  
  .download-button {
    padding: 14px 20px;
    font-size: 16px;
  }
}
</style>
